package avicit.bdp.dcs.detail.rest;

import avicit.bdp.dcs.Constant;
import avicit.platform6.core.rest.msg.ResponseMsg;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

import static org.junit.Assert.assertEquals;

public class TaskTableDetailRestTest {

    @Before
    public void setUp() throws Exception {
    }

    @After
    public void tearDown() throws Exception {
    }

    @Test
    public void getTaskTableDetailList() {
        RestTemplate restTemplate  = new RestTemplate();
        // 使用get方法提交请求，第一参数为url,第二个参数为相应返回数据类型
        ResponseEntity<ResponseMsg> result = restTemplate.getForEntity(Constant.HOSTPORT + "/api/bdp/dcs/detail/TaskTableDetailRest/getTaskTableDetailList?jobId="+Constant.JOBID, ResponseMsg.class);
        assertEquals("200", result.getBody().getRetCode());
    }

}